﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using RM.Entities;
using RM.Entities.Data;

namespace RM.Web.Services
{
    // NOTE: If you change the class name "CandidateService" here, you must also update the reference to "CandidateService" in Web.config.
    public class CandidateService : ICandidateService
    {
        #region ICandidateService Members

        public IList<Candidate> GetAll()
        {
            CandidateManager candidateManager = new CandidateManager();
            return candidateManager.GetAll();
        }

        public void Save(Candidate candidate)
        {
            CandidateManager candidateManager = new CandidateManager();
            candidateManager.Save(candidate);            
        }

        public IList<Candidate> GetAllBySearch(string searchString)
        {
            CandidateManager candidateManager = new CandidateManager();
            return candidateManager.GetAllBySearch(searchString);
        }

        #endregion
    }
}
